﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;

namespace Himp.Outpatient.V1
{
    [Area(OutpatientRemoteServiceConsts.ModuleName)]
    [RemoteService(Name = OutpatientRemoteServiceConsts.RemoteServiceName)]
    [Route("api/outpatient/v1/otpOrdRec")]
    [ApiVersion("1")]
    [ApiController]
    [ControllerName("otpOrdRec")]
    public class OtpOrdRecController : OutpatientController
    {
        private IOtpOrdRecService _otpOrdRecService;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="otpOrdRecService"></param>
        public OtpOrdRecController(IOtpOrdRecService otpOrdRecService)
        {
            _otpOrdRecService = otpOrdRecService;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<OtpOrdRecDto> PostAsync([FromBody] OtpOrdRecCreateDto request)
        {
            var recvTime = DateTime.Now.ToString("yyyyMMddHHmmss");
            return await _otpOrdRecService.PostAsync(request);
        }
    }
}
